home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Mania 6
/
MacMania 6.toast
/
/
Multimedia & Desktop
/
VideoToolbox
/
VideoToolboxSources
/
Log2L.c
< prev
next >
Wrap
Text File
|
1995-07-19
|
276b
|
19 lines
/*
Log2L.c
HISTORY:
12/3/91 dgp changed zero argument return from -1 to LONG_MIN.
*/
#include "VideoToolbox.h"
long Log2L(register unsigned long i)
/* returns the integer part of log2(j) */
{
long L=-1;
if(i==0)return LONG_MIN;
while(i>0){
i>>=1;
L++;
}
return L;
}